﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using BeanboxSoftware.BeanProxy;

namespace BeanProxyTest
{
  [TestClass]
  public class AbstractTest
  {
    public class Parent<T, V>
    {
      public virtual Child<V> GetChild()
      {
        throw new NotImplementedException();
      }

      public class Child<K>
      {
      }
    }

    [TestMethod]
    public void InnerChildBuildTest()
    {
      var ct = typeof(Parent<int, double>.Child<double>);

      var proxy = ProxyManager.CreateProxy<Parent<int, double>>();
      var config = ProxyManager.GetFunc<Parent<int, double>.Child<double>>(proxy.GetChild);

      var expected = new Parent<int, double>.Child<double>();
      config.Return = expected;
      Assert.AreEqual(expected, proxy.GetChild());
    }
  }
}

////
